Function: which-key--string<

which-key--string< is a byte-compiled function defined in which-key.el.gz.

Signature

(which-key--string< A B &optional ALPHA)

Source Code

;; Defined in /usr/src/emacs/lisp/which-key.el.gz
;;; Sorting functions

(defun which-key--string< (a b &optional alpha)
  (let ((da (downcase a))
        (db (downcase b)))
    (cond
     ((and alpha (not which-key-sort-uppercase-first))
      (if (string-equal da db)
          (not (string-lessp a b))
        (string-lessp da db)))
     ((and alpha which-key-sort-uppercase-first)
      (if (string-equal da db)
          (string-lessp a b)
        (string-lessp da db)))
     ((not which-key-sort-uppercase-first)
      (let ((aup (not (string-equal da a)))
            (bup (not (string-equal db b))))
        (if (eq aup bup)
            (string-lessp a b)
          bup)))
     (t (string-lessp a b)))))